<template>
  <div class="pcy-button-group">
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: "pcyButtonGroup",
};
</script>
<style lang="scss" >
// 清楚浮动
.pcy-button-group{
  overflow: hidden;
}
//浮动
.pcy-button-group > .pcy-button {
  float: left;
  position: rpcyative;
}
//去除原来button的margin
.pcy-button-group .pcy-button+.pcy-button {
    margin-left: 0;
}

.pcy-button-group>.pcy-button:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-color:hsla(0,0%,100%,.5);
}

.pcy-button-group>.pcy-button:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-color:hsla(0,0%,100%,.5);
}

.pcy-button-group>.pcy-button:not(:last-child){
  margin-right: -1px;
}

.pcy-button-group>.pcy-button:not(:first-child):not(:last-child){
  border-radius: 0;
}
.pcy-button-group .pcy-button--primary:not(:first-child):not(:last-child) {
    border-left-color: hsla(0,0%,100%,.5);
    border-right-color: hsla(0,0%,100%,.5);
}



.pcy-button-group+.pcy-button-group{
  margin-right: 10px;
}
</style>
